﻿<%@ Page Language="C#" %>

<script runat="server">
  [System.Web.Services.WebMethod]
    public static string GetOrderDetail(string OrderID , string BuyerName)
  {
      B2C_MALL_ACCOUNT ws = new B2C_MALL_ACCOUNT();
      ws.Url = ConfigurationManager.AppSettings["B2C_MALL_ACCOUNT"].ToString();
      string jsonString = ws.B2C_MALL_GetOrderDetail(CommonUtil.GetWebDevice()
        , HttpContext.Current.User.Identity.Name, OrderID, BuyerName);
      JObject restoredObject = JsonConvert.DeserializeObject<JObject>(jsonString);
      if (restoredObject["PAY_TYPE"]!=null && !string.IsNullOrEmpty(restoredObject["PAY_TYPE"].ToString()))
      {
        //取得付款方式名稱(非代號)
        restoredObject["PAY_TYPE"] = CommonUtil.GetPayType(restoredObject["PAY_TYPE"].ToString());        
      }      
      return JsonConvert.SerializeObject(restoredObject);
  }
</script>